Pgetuid

Section: Aug. 1, 1992 (2)
Updated: MiNT Programmer's Manual
Index Return to Main Contents
 

NAME

Pgetuid, Pgetgid - get the current user or group id  

SYNOPSIS

WORD Pgetuid();
WORD Pgetgid();
WORD Pgeteuid();
WORD Pgetegid();
 

DESCRIPTION

Pgetuid returns the real user id of the currently running process. This is a number between 0 and 255 which determines the access permissions of the process, and which may be used in multi-user systems to distinguish different users of the system.

Similarly, Pgetgid returns the real group id of the currently running process; this will also be a number between 0 and 255.

Pgeteuid and Pgetegid are similar to Pgetuid and Pgetgid respectively, except that they return the effective user or group id. This is normally the same as the real user or group id, except that if a program is run which has the set uid or set gid bit bit set, it will run with an effective user or group id equal to the owner of the program file. Access to files is based upon the effective user or group id, so the set uid (and set gid) mechanism allows users (in particular the super user) to grant permissions to other users. This mechanism also exists in the Unix(tm) operating system.  

SEE ALSO

Psetuid(2)


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 11:14:00 GMT, June 22, 2025